-- GENERATED SPELL FOR [Mage Hunter Initiate] --


function spell0_26728(pUnit, Event) --@Drain Mana,Drain--
pUnit:FullCastSpellOnTarget(17682,pUnit:GetRandomPlayer(4))
pUnit:RegisterEvent('Sorts_26728', 5000, 1)
end

function spell1_26728(pUnit, Event) --@Magic Burn,n/a--
pUnit:FullCastSpellOnTarget(50198,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_26728', 23000, 1)
end

function spell2_26728(pUnit, Event) --@Magic Burn,n/a--
pUnit:FullCastSpellOnTarget(56860,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_26728', 23000, 1)
end

function spell3_26728(pUnit, Event) --@Renew,Heal--
pUnit:FullCastSpellOnTarget(25058,pUnit)
pUnit:RegisterEvent('Sorts_26728', 15000, 1)
end

function Sorts_26728(pUnit, Event)
local choix_sorts_26728 = math.random(0, 3)
if choix_sorts_26728 == 0 then
pUnit:RegisterEvent('spell0_26728', 1, 1)
end
if choix_sorts_26728 == 1 then
pUnit:RegisterEvent('spell1_26728', 1, 1)
end
if choix_sorts_26728 == 2 then
pUnit:RegisterEvent('spell2_26728', 1, 1)
end
if choix_sorts_26728 == 3 then
pUnit:RegisterEvent('spell3_26728', 1, 1)
end
end

function mob26728_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_26728', math.random(1500, 3000), 1)
end

function mob26728_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob26728_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob26728_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(26728, 1, 'mob26728_Action')
RegisterUnitEvent(26728, 2, 'mob26728_Leave')
RegisterUnitEvent(26728, 3, 'mob26728_Kill')
RegisterUnitEvent(26728, 4, 'mob26728_Die')
